package pl.register.android.year;

import pl.register.android.group.GroupType;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Mateusz Strzelecki
 * @since 2013-04-22
 */
public enum YearType {
    FIRST_YEAR {
        @Override
        public String getShortName() {
            return "Rok I";
        }

        @Override
        public String getName() {
            return "Rok I";
        }

        @Override
        public List<GroupType> getGroups() {
            List<GroupType> groupTypes = new ArrayList<GroupType>();
            groupTypes.add(GroupType.MORNING);
            groupTypes.add(GroupType.AFTERNOON);
            return groupTypes;
        }
    },
    SECOND_YEAR {
        @Override
        public String getShortName() {
            return "Rok II";
        }

        @Override
        public String getName() {
            return "Rok II";
        }

        @Override
        public List<GroupType> getGroups() {
            List<GroupType> groupTypes = new ArrayList<GroupType>();
            groupTypes.add(GroupType.MORNING);
            groupTypes.add(GroupType.AFTERNOON);
            return groupTypes;
        }
    },
    THIRD_YEAR {
        @Override
        public String getShortName() {
            return "Rok III";
        }

        @Override
        public String getName() {
            return "Rok III";
        }

        @Override
        public List<GroupType> getGroups() {
            List<GroupType> groupTypes = new ArrayList<GroupType>();
            groupTypes.add(GroupType.MORNING);
            groupTypes.add(GroupType.AFTERNOON);
            return groupTypes;
        }
    },
    INTENSIVE_YEAR {
        @Override
        public String getShortName() {
            return "Intensywny";
        }

        @Override
        public String getName() {
            return "Intensywny";
        }

        @Override
        public List<GroupType> getGroups() {
            List<GroupType> groupTypes = new ArrayList<GroupType>();
            groupTypes.add(GroupType.INTENSIVE);
            return groupTypes;
        }
    },
    HOLIDAY_I_YEAR {
        @Override
        public String getShortName() {
            return "WI";
        }

        @Override
        public String getName() {
            return "Wakacyjny";
        }

        @Override
        public List<GroupType> getGroups() {
            List<GroupType> groupTypes = new ArrayList<GroupType>();
            groupTypes.add(GroupType.MORNING);
            return groupTypes;
        }
    },
    HOLIDAY_II_YEAR {
        @Override
        public String getShortName() {
            return "WII";
        }

        @Override
        public String getName() {
            return "Wakacyjny";
        }

        @Override
        public List<GroupType> getGroups() {
            List<GroupType> groupTypes = new ArrayList<GroupType>();
            groupTypes.add(GroupType.MORNING);
            return groupTypes;
        }
    };

    public abstract String getName();

    public abstract String getShortName();

    public abstract List<GroupType> getGroups();

    public static List<YearType> asList() {
        List<YearType> yearTypes= new ArrayList<YearType>();
        for (YearType yearType: values()) {
            yearTypes.add(yearType);
        }
        return yearTypes;
    }
}
